package be.sc.classicnetwork.model;

import javax.persistence.Entity;
import javax.persistence.Lob;

import org.hibernate.validator.Email;
import org.hibernate.validator.NotEmpty;

@Entity
public class Request extends AbstractEntity {

    /**  */
    private static final long serialVersionUID = -7593341947344401498L;

    private String subject;

    @NotEmpty
    private String name;

    private String company;

    private String address;

    @NotEmpty
    @Email
    private String email;

    private String phone;

    private String mobile;

    private String fax;

    @Lob
    private String text;

    public String getText() {
	return text;
    }

    public String getTextHtml() {
	return (text != null) ? text.replaceAll("\\n", "<br>") : null;
    }

    public void setText(String message) {
	this.text = message;
    }

    public String getName() {
	return name;
    }

    public void setName(String name) {
	this.name = name;
    }

    public String getCompany() {
	return company;
    }

    public void setCompany(String company) {
	this.company = company;
    }

    public String getAddress() {
	return address;
    }

    public void setAddress(String address) {
	this.address = address;
    }

    public String getEmail() {
	return email;
    }

    public void setEmail(String email) {
	this.email = email;
    }

    public String getPhone() {
	return phone;
    }

    public void setPhone(String phone) {
	this.phone = phone;
    }

    public String getMobile() {
	return mobile;
    }

    public void setMobile(String mobile) {
	this.mobile = mobile;
    }

    public String getFax() {
	return fax;
    }

    public void setFax(String fax) {
	this.fax = fax;
    }

    public String getSubject() {
	return subject;
    }

    public void setSubject(String subject) {
	this.subject = subject;
    }
}
